<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>
<body>
    <div id="app"></div>

    <template id="my-app">
      <div>
          <!-- 编译成功之后v-cloak不会再起作用 -->
        <h2 v-cloak>{{message}}</h2>
      </div>
    </template>

    <script src="../vue/vue.js"></script>
    <script>
        const App = {
            template: '#my-app',
            data() {
                return {
                    message: 'hello'
                }
            }
        }
        Vue.createApp(App).mount('#app');
    </script>
</body>
</html>